package zb.blog.service;

import com.github.pagehelper.PageInfo;
import com.qiniu.common.QiniuException;
import zb.blog.base.bean.Result;
import zb.blog.bean.ArticleBean;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.io.UnsupportedEncodingException;
import java.util.Map;

public interface IArticleService {
    PageInfo<ArticleBean> getArticleByStatus(int pageNum, int pageSize, Map<String, Object> param);

    Result addArticle(ArticleBean articleBean, HttpSession session);

    Result getArticleById(String id);

    Result updateArticleStatus(String id, Integer status);

    Result updateArticle(ArticleBean articleBean, String ecnryptId);

    Result getQnyToken(String key_prefix, String bucketname);

    Result delQnyArtFile(String key, String type) throws QiniuException;

    Result getDownLoadUrl(String artId, HttpServletRequest request) throws UnsupportedEncodingException;

    Result updateBannerUrl(String artId, String key, String oldKey);

    Result updateZipFileUrl(String artId, String key, String oldKey);

    void recordArtCount(String artId);

    PageInfo<ArticleBean> getArticleAll(Map<String, String> param);
}
